class RaijinWProj extends Nade;

//never respond to taking damage
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex);

simulated function Explode(vector HitLocation, vector HitNormal)
{	
	Local Actor A;
	Local KFMonster K;
	local RaijinWPoisonProjectile p;
	
	if(bHasExploded)
		return;
		
	bHasExploded=True;
	
	PlaySound(ExplodeSounds[rand(ExplodeSounds.length)],,2.0);
	
	if (ROLE == ROLE_Authority)
	{
		foreach CollidingActors (class 'Actor', A, DamageRadius, HitLocation)
		{
			if (KFMonster(A) != None && ExtendedZCollision(A) == none)
			{
				A.TakeDamage(Damage,Instigator,A.Location,A.Location,MyDamageType);
				K = KFMonster(A);
				p = Instigator.Spawn(Class'PerksSimHostOrg.RaijinWPoisonProjectile', instigator,, Location, K.Rotation);
				p.Stick(K,K.Location);
			}
		}
		Instigator.TakeDamage(20.0,Instigator,Instigator.Location,Instigator.Location,MyDamageType);
	}
		
	if ( EffectIsRelevant(Location,false) )
	{
		Spawn(Class'PerksSimHostOrg.RaijinWEmitter',,, HitLocation, rotator(vect(0,0,1)));
	}

	Destroy();
}

defaultproperties
{
     ExplodeSounds(0)=Sound'SimHostOrgS.Raijinsound'
     ExplodeSounds(1)=Sound'SimHostOrgS.Raijinsound'
     ExplodeSounds(2)=Sound'SimHostOrgS.Raijinsound'
     ExplodeTimer=0.100000
     Damage=1000.000000
     DamageRadius=90.000000
     MomentumTransfer=25000.000000
     MyDamageType=Class'PerksSimHostOrg.DamTypeRaijinW'
     DrawScale=0.010000
}
